import 'package:flutter/material.dart';

class MyApp4 extends StatelessWidget {
  const MyApp4({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      //1.导航
      appBar: AppBar(
        title: const Text('Container组件'),
        backgroundColor: Colors.pink,
      ),
      //2.内容
      body: Container(
        width: 300,
        height: 300,
        // color: Colors.blue,
        child: Text('Container组件'),
        //内边距
        // padding: EdgeInsets.all(10),
        padding: EdgeInsets.only(left: 0),
        //外边距
        margin: EdgeInsets.all(10),
        //设置对齐方式
        // alignment: Alignment.center,
        // alignment: Alignment.bottomCenter,
        alignment: Alignment.centerLeft,
        //设置边框圆角 //一旦设置了decoration，背景色
        decoration: BoxDecoration(
          color: Colors.blue,
          //设置边框
          // border: Border.all(color: Colors.red, width: 5),
          //设置左边框
          border: Border(left: BorderSide(color: Colors.red, width: 10)),
          // borderRadius: BorderRadius.circular(10),
          borderRadius: BorderRadius.only(topLeft: Radius.circular(20)),
        ),
      ),
    );
  }
}
